// 声明函数中的可变参数
function sum(...number) {
    let count = 0;
    for (let i = 0; i < number.length; i++) {
        count += number[i]
    }
    return count;
}

console.log(sum(1, 2, 3));;
console.log(sum(1, 2, 3, 4, 5));
console.log(sum(1, 2, 3, 4, 5, 6));